package graph;

import javax.vecmath.Matrix3d;
import javax.vecmath.Point3d;

public class Node<T> {
	public Point3d pos;
	public T data;
	Node(T d) { data = d; pos = new Point3d(0, 0, 0);}
	Node(T d, double x,double y,double z) {
		data = d;
		pos = new Point3d(x,y,z);
	}
	Node(T d,double xx,double yy) {
		this(d, xx,yy,0);
	}
	Node(T d, Point3d pos) {
		data = d;
		this.pos = pos;
	}
	@Override
	public String toString() {
		return "Node [" + data + "," + pos.x + "," + pos.y + "," + pos.z + "]";
	}
	@Override
	public Node<T> clone() {
		return new Node<T>(data, (Point3d) pos.clone());
	}
	public void transform(Matrix3d m) {
		m.transform(pos);
	}
}
